#!/bin/bash
set -e
# root
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/wine-stable
sudo setcap 'cap_net_bind_service=+ep' /usr/lib/wine/wineserver
sudo setcap 'cap_net_bind_service=+ep' /usr/sbin/dnscrypt-proxy
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/caddy
sudo setcap cap_net_raw+ep /usr/sbin/iftop
# sudo setcap 'cap_net_admin+eip' /usr/sbin/iotop
sudo setcap cap_net_admin,cap_net_bind_service,CAP_NET_RAW=+ep $config_path/phantomsocks/phantomsocks
sudo cp $config_path/steamcommunity/steamcommunityCA.pem /usr/local/share/ca-certificates/
sudo update-ca-certificates
cat $config_path/steamcommunity/hosts.txt | sudo tee -a /etc/hosts
# systemctl enable --now cronie.service
